{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "58320255",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "de55e26c",
   "metadata": {},
   "outputs": [],
   "source": [
    "path = '/' #replace your path here"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "24f3adaf",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>Unnamed: 0.1</th>\n",
       "      <th>video_id</th>\n",
       "      <th>channel_id</th>\n",
       "      <th>channel_title</th>\n",
       "      <th>video_description</th>\n",
       "      <th>video_publish_date</th>\n",
       "      <th>video_thumbnail</th>\n",
       "      <th>video_view_count</th>\n",
       "      <th>video_like_count</th>\n",
       "      <th>...</th>\n",
       "      <th>sanctity_valence</th>\n",
       "      <th>sanctity_positive</th>\n",
       "      <th>sanctity_negative</th>\n",
       "      <th>sanctity_strength</th>\n",
       "      <th>sanctity_ambivalence</th>\n",
       "      <th>liberty_valence</th>\n",
       "      <th>liberty_positive</th>\n",
       "      <th>liberty_negative</th>\n",
       "      <th>liberty_strength</th>\n",
       "      <th>liberty_ambivalence</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>id:bW3IQ-ke43w</td>\n",
       "      <td>UCZaT_X_mc0BI-djXOlfhqWQ</td>\n",
       "      <td>VICE News</td>\n",
       "      <td>Watch our full-length documentary on Greta and...</td>\n",
       "      <td>9/23/19 17:22</td>\n",
       "      <td>https://i.ytimg.com/vi/bW3IQ-ke43w/hqdefault.jpg</td>\n",
       "      <td>5052627.0</td>\n",
       "      <td>95485.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.031312</td>\n",
       "      <td>0.008515</td>\n",
       "      <td>0.039827</td>\n",
       "      <td>0.048343</td>\n",
       "      <td>0.002491</td>\n",
       "      <td>-0.034399</td>\n",
       "      <td>0.011715</td>\n",
       "      <td>0.046113</td>\n",
       "      <td>0.057828</td>\n",
       "      <td>0.003866</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>id:waBWX2dBGOI</td>\n",
       "      <td>UCY30JRSgfhYXA6i6xX1erWg</td>\n",
       "      <td>Smosh</td>\n",
       "      <td>BLOOPERS &amp; MORE! ►► http://smo.sh/1orXjaN\\nSMO...</td>\n",
       "      <td>2/19/16 20:00</td>\n",
       "      <td>https://i.ytimg.com/vi/waBWX2dBGOI/hqdefault.jpg</td>\n",
       "      <td>4743612.0</td>\n",
       "      <td>92114.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.018002</td>\n",
       "      <td>0.010549</td>\n",
       "      <td>0.028551</td>\n",
       "      <td>0.039100</td>\n",
       "      <td>0.002514</td>\n",
       "      <td>-0.016104</td>\n",
       "      <td>0.013391</td>\n",
       "      <td>0.029494</td>\n",
       "      <td>0.042885</td>\n",
       "      <td>0.002497</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>id:rhQVustYV24</td>\n",
       "      <td>UCwWhs_6x42TyRM4Wstoq8HA</td>\n",
       "      <td>The Daily Show with Trevor Noah</td>\n",
       "      <td>Sixteen-year-old climate activist Greta Thunbe...</td>\n",
       "      <td>9/14/19 13:00</td>\n",
       "      <td>https://i.ytimg.com/vi/rhQVustYV24/hqdefault.jpg</td>\n",
       "      <td>4115184.0</td>\n",
       "      <td>110654.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.020915</td>\n",
       "      <td>0.006775</td>\n",
       "      <td>0.027690</td>\n",
       "      <td>0.034465</td>\n",
       "      <td>0.001305</td>\n",
       "      <td>-0.054547</td>\n",
       "      <td>0.006637</td>\n",
       "      <td>0.061184</td>\n",
       "      <td>0.067822</td>\n",
       "      <td>0.002969</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>id:TMrtLsQbaok</td>\n",
       "      <td>UCIRYBXDze5krPDzAEOxFGVA</td>\n",
       "      <td>Guardian News</td>\n",
       "      <td>'You have stolen my dreams and my childhood wi...</td>\n",
       "      <td>9/23/19 15:22</td>\n",
       "      <td>https://i.ytimg.com/vi/TMrtLsQbaok/hqdefault.jpg</td>\n",
       "      <td>4030432.0</td>\n",
       "      <td>53115.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.017990</td>\n",
       "      <td>0.012413</td>\n",
       "      <td>0.030403</td>\n",
       "      <td>0.042816</td>\n",
       "      <td>0.002876</td>\n",
       "      <td>-0.052255</td>\n",
       "      <td>0.008758</td>\n",
       "      <td>0.061012</td>\n",
       "      <td>0.069770</td>\n",
       "      <td>0.004750</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>id:RkdbSxyXftc</td>\n",
       "      <td>UCZWlSUNDvCCS1hBiXV0zKcA</td>\n",
       "      <td>PragerU</td>\n",
       "      <td>Since time immemorial, our climate has been an...</td>\n",
       "      <td>7/27/15 7:05</td>\n",
       "      <td>https://i.ytimg.com/vi/RkdbSxyXftc/hqdefault.jpg</td>\n",
       "      <td>3653015.0</td>\n",
       "      <td>44027.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.014523</td>\n",
       "      <td>0.011561</td>\n",
       "      <td>0.026084</td>\n",
       "      <td>0.037645</td>\n",
       "      <td>0.001960</td>\n",
       "      <td>-0.038399</td>\n",
       "      <td>0.008735</td>\n",
       "      <td>0.047134</td>\n",
       "      <td>0.055869</td>\n",
       "      <td>0.003353</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13740</th>\n",
       "      <td>13740</td>\n",
       "      <td>13740</td>\n",
       "      <td>88415835</td>\n",
       "      <td>14762950</td>\n",
       "      <td>king_londo</td>\n",
       "      <td>Salute to all my independent sovereign thinker...</td>\n",
       "      <td>2022-12-24T14:48:53.000Z</td>\n",
       "      <td>https://www.junkipedia.org/rails/active_storag...</td>\n",
       "      <td>10922.0</td>\n",
       "      <td>1650.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.039061</td>\n",
       "      <td>0.049140</td>\n",
       "      <td>0.010079</td>\n",
       "      <td>0.059219</td>\n",
       "      <td>0.003832</td>\n",
       "      <td>-0.028286</td>\n",
       "      <td>0.007433</td>\n",
       "      <td>0.035719</td>\n",
       "      <td>0.043152</td>\n",
       "      <td>0.001879</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13741</th>\n",
       "      <td>13741</td>\n",
       "      <td>13741</td>\n",
       "      <td>92265721</td>\n",
       "      <td>1435134</td>\n",
       "      <td>Taylor Sprenger</td>\n",
       "      <td>And proud #fyp #vaccine #countrytiktok #carhar...</td>\n",
       "      <td>2022-12-26T17:08:40.000Z</td>\n",
       "      <td>https://www.junkipedia.org/rails/active_storag...</td>\n",
       "      <td>31269.0</td>\n",
       "      <td>5243.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.114840</td>\n",
       "      <td>0.114840</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.114840</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.039140</td>\n",
       "      <td>0.039140</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.039140</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13742</th>\n",
       "      <td>13742</td>\n",
       "      <td>13742</td>\n",
       "      <td>88415841</td>\n",
       "      <td>14762952</td>\n",
       "      <td>Is Lauren Your Lawyer?</td>\n",
       "      <td>Can you stop the other parent from vaccinating...</td>\n",
       "      <td>2022-12-27T17:09:09.000Z</td>\n",
       "      <td>https://www.junkipedia.org/rails/active_storag...</td>\n",
       "      <td>65831.0</td>\n",
       "      <td>9540.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.023810</td>\n",
       "      <td>0.003158</td>\n",
       "      <td>0.026969</td>\n",
       "      <td>0.030127</td>\n",
       "      <td>0.000984</td>\n",
       "      <td>-0.030244</td>\n",
       "      <td>0.018266</td>\n",
       "      <td>0.048509</td>\n",
       "      <td>0.066775</td>\n",
       "      <td>0.005377</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13743</th>\n",
       "      <td>13743</td>\n",
       "      <td>13743</td>\n",
       "      <td>88598358</td>\n",
       "      <td>13988980</td>\n",
       "      <td>Adrianne Lucretia 🥰</td>\n",
       "      <td>Shots day again 🥹 #shots #baby #cutie #sixmont...</td>\n",
       "      <td>2022-12-28T17:52:31.000Z</td>\n",
       "      <td>https://www.junkipedia.org/rails/active_storag...</td>\n",
       "      <td>1209384.0</td>\n",
       "      <td>132791.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.031576</td>\n",
       "      <td>0.006895</td>\n",
       "      <td>0.038470</td>\n",
       "      <td>0.045365</td>\n",
       "      <td>0.001474</td>\n",
       "      <td>-0.079528</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.079528</td>\n",
       "      <td>0.079528</td>\n",
       "      <td>0.000780</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13744</th>\n",
       "      <td>13744</td>\n",
       "      <td>13744</td>\n",
       "      <td>88840071</td>\n",
       "      <td>13475711</td>\n",
       "      <td>Jocelyn C Stewart</td>\n",
       "      <td>PSA: Upgrade discharge after COVID-19 vaccinat...</td>\n",
       "      <td>2022-12-31T21:53:30.000Z</td>\n",
       "      <td>https://www.junkipedia.org/rails/active_storag...</td>\n",
       "      <td>12764.0</td>\n",
       "      <td>716.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.043714</td>\n",
       "      <td>0.001746</td>\n",
       "      <td>0.045459</td>\n",
       "      <td>0.047205</td>\n",
       "      <td>0.001473</td>\n",
       "      <td>-0.002185</td>\n",
       "      <td>0.031686</td>\n",
       "      <td>0.033871</td>\n",
       "      <td>0.065558</td>\n",
       "      <td>0.005899</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>13745 rows × 51 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       Unnamed: 0  Unnamed: 0.1        video_id                channel_id  \\\n",
       "0               0             0  id:bW3IQ-ke43w  UCZaT_X_mc0BI-djXOlfhqWQ   \n",
       "1               1             1  id:waBWX2dBGOI  UCY30JRSgfhYXA6i6xX1erWg   \n",
       "2               2             2  id:rhQVustYV24  UCwWhs_6x42TyRM4Wstoq8HA   \n",
       "3               3             3  id:TMrtLsQbaok  UCIRYBXDze5krPDzAEOxFGVA   \n",
       "4               4             4  id:RkdbSxyXftc  UCZWlSUNDvCCS1hBiXV0zKcA   \n",
       "...           ...           ...             ...                       ...   \n",
       "13740       13740         13740        88415835                  14762950   \n",
       "13741       13741         13741        92265721                   1435134   \n",
       "13742       13742         13742        88415841                  14762952   \n",
       "13743       13743         13743        88598358                  13988980   \n",
       "13744       13744         13744        88840071                  13475711   \n",
       "\n",
       "                         channel_title  \\\n",
       "0                            VICE News   \n",
       "1                                Smosh   \n",
       "2      The Daily Show with Trevor Noah   \n",
       "3                        Guardian News   \n",
       "4                              PragerU   \n",
       "...                                ...   \n",
       "13740                       king_londo   \n",
       "13741                  Taylor Sprenger   \n",
       "13742           Is Lauren Your Lawyer?   \n",
       "13743              Adrianne Lucretia 🥰   \n",
       "13744                Jocelyn C Stewart   \n",
       "\n",
       "                                       video_description  \\\n",
       "0      Watch our full-length documentary on Greta and...   \n",
       "1      BLOOPERS & MORE! ►► http://smo.sh/1orXjaN\\nSMO...   \n",
       "2      Sixteen-year-old climate activist Greta Thunbe...   \n",
       "3      'You have stolen my dreams and my childhood wi...   \n",
       "4      Since time immemorial, our climate has been an...   \n",
       "...                                                  ...   \n",
       "13740  Salute to all my independent sovereign thinker...   \n",
       "13741  And proud #fyp #vaccine #countrytiktok #carhar...   \n",
       "13742  Can you stop the other parent from vaccinating...   \n",
       "13743  Shots day again 🥹 #shots #baby #cutie #sixmont...   \n",
       "13744  PSA: Upgrade discharge after COVID-19 vaccinat...   \n",
       "\n",
       "             video_publish_date  \\\n",
       "0                 9/23/19 17:22   \n",
       "1                 2/19/16 20:00   \n",
       "2                 9/14/19 13:00   \n",
       "3                 9/23/19 15:22   \n",
       "4                  7/27/15 7:05   \n",
       "...                         ...   \n",
       "13740  2022-12-24T14:48:53.000Z   \n",
       "13741  2022-12-26T17:08:40.000Z   \n",
       "13742  2022-12-27T17:09:09.000Z   \n",
       "13743  2022-12-28T17:52:31.000Z   \n",
       "13744  2022-12-31T21:53:30.000Z   \n",
       "\n",
       "                                         video_thumbnail  video_view_count  \\\n",
       "0       https://i.ytimg.com/vi/bW3IQ-ke43w/hqdefault.jpg         5052627.0   \n",
       "1       https://i.ytimg.com/vi/waBWX2dBGOI/hqdefault.jpg         4743612.0   \n",
       "2       https://i.ytimg.com/vi/rhQVustYV24/hqdefault.jpg         4115184.0   \n",
       "3       https://i.ytimg.com/vi/TMrtLsQbaok/hqdefault.jpg         4030432.0   \n",
       "4       https://i.ytimg.com/vi/RkdbSxyXftc/hqdefault.jpg         3653015.0   \n",
       "...                                                  ...               ...   \n",
       "13740  https://www.junkipedia.org/rails/active_storag...           10922.0   \n",
       "13741  https://www.junkipedia.org/rails/active_storag...           31269.0   \n",
       "13742  https://www.junkipedia.org/rails/active_storag...           65831.0   \n",
       "13743  https://www.junkipedia.org/rails/active_storag...         1209384.0   \n",
       "13744  https://www.junkipedia.org/rails/active_storag...           12764.0   \n",
       "\n",
       "       video_like_count  ... sanctity_valence sanctity_positive  \\\n",
       "0               95485.0  ...        -0.031312          0.008515   \n",
       "1               92114.0  ...        -0.018002          0.010549   \n",
       "2              110654.0  ...        -0.020915          0.006775   \n",
       "3               53115.0  ...        -0.017990          0.012413   \n",
       "4               44027.0  ...        -0.014523          0.011561   \n",
       "...                 ...  ...              ...               ...   \n",
       "13740            1650.0  ...         0.039061          0.049140   \n",
       "13741            5243.0  ...         0.114840          0.114840   \n",
       "13742            9540.0  ...        -0.023810          0.003158   \n",
       "13743          132791.0  ...        -0.031576          0.006895   \n",
       "13744             716.0  ...        -0.043714          0.001746   \n",
       "\n",
       "      sanctity_negative  sanctity_strength sanctity_ambivalence  \\\n",
       "0              0.039827           0.048343             0.002491   \n",
       "1              0.028551           0.039100             0.002514   \n",
       "2              0.027690           0.034465             0.001305   \n",
       "3              0.030403           0.042816             0.002876   \n",
       "4              0.026084           0.037645             0.001960   \n",
       "...                 ...                ...                  ...   \n",
       "13740          0.010079           0.059219             0.003832   \n",
       "13741          0.000000           0.114840             0.000000   \n",
       "13742          0.026969           0.030127             0.000984   \n",
       "13743          0.038470           0.045365             0.001474   \n",
       "13744          0.045459           0.047205             0.001473   \n",
       "\n",
       "      liberty_valence  liberty_positive  liberty_negative  liberty_strength  \\\n",
       "0           -0.034399          0.011715          0.046113          0.057828   \n",
       "1           -0.016104          0.013391          0.029494          0.042885   \n",
       "2           -0.054547          0.006637          0.061184          0.067822   \n",
       "3           -0.052255          0.008758          0.061012          0.069770   \n",
       "4           -0.038399          0.008735          0.047134          0.055869   \n",
       "...               ...               ...               ...               ...   \n",
       "13740       -0.028286          0.007433          0.035719          0.043152   \n",
       "13741        0.039140          0.039140          0.000000          0.039140   \n",
       "13742       -0.030244          0.018266          0.048509          0.066775   \n",
       "13743       -0.079528          0.000000          0.079528          0.079528   \n",
       "13744       -0.002185          0.031686          0.033871          0.065558   \n",
       "\n",
       "      liberty_ambivalence  \n",
       "0                0.003866  \n",
       "1                0.002497  \n",
       "2                0.002969  \n",
       "3                0.004750  \n",
       "4                0.003353  \n",
       "...                   ...  \n",
       "13740            0.001879  \n",
       "13741            0.000000  \n",
       "13742            0.005377  \n",
       "13743            0.000780  \n",
       "13744            0.005899  \n",
       "\n",
       "[13745 rows x 51 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv(path + 'moral scored_final_dataset_march_10_2023.csv')\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "2ab8f711",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['Unnamed: 0', 'Unnamed: 0.1', 'video_id', 'channel_id', 'channel_title',\n",
       "       'video_description', 'video_publish_date', 'video_thumbnail',\n",
       "       'video_view_count', 'video_like_count', 'platform', 'issue',\n",
       "       'video_description_processed', 'image_id',\n",
       "       'temp_video_description_processed', 'gender', 'female', 'male',\n",
       "       'neutral', 'text_clean_list', 'effective_word_count', 'care_valence',\n",
       "       'care_positive', 'care_negative', 'care_strength', 'care_ambivalence',\n",
       "       'fairness_valence', 'fairness_positive', 'fairness_negative',\n",
       "       'fairness_strength', 'fairness_ambivalence', 'loyalty_valence',\n",
       "       'loyalty_positive', 'loyalty_negative', 'loyalty_strength',\n",
       "       'loyalty_ambivalence', 'authority_valence', 'authority_positive',\n",
       "       'authority_negative', 'authority_strength', 'authority_ambivalence',\n",
       "       'sanctity_valence', 'sanctity_positive', 'sanctity_negative',\n",
       "       'sanctity_strength', 'sanctity_ambivalence', 'liberty_valence',\n",
       "       'liberty_positive', 'liberty_negative', 'liberty_strength',\n",
       "       'liberty_ambivalence'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "d67074f2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>Unnamed: 0.1</th>\n",
       "      <th>video_id</th>\n",
       "      <th>channel_id</th>\n",
       "      <th>channel_title</th>\n",
       "      <th>video_description</th>\n",
       "      <th>video_publish_date</th>\n",
       "      <th>video_thumbnail</th>\n",
       "      <th>video_view_count</th>\n",
       "      <th>video_like_count</th>\n",
       "      <th>...</th>\n",
       "      <th>sanctity_valence</th>\n",
       "      <th>sanctity_positive</th>\n",
       "      <th>sanctity_negative</th>\n",
       "      <th>sanctity_strength</th>\n",
       "      <th>sanctity_ambivalence</th>\n",
       "      <th>liberty_valence</th>\n",
       "      <th>liberty_positive</th>\n",
       "      <th>liberty_negative</th>\n",
       "      <th>liberty_strength</th>\n",
       "      <th>liberty_ambivalence</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>id:rhQVustYV24</td>\n",
       "      <td>UCwWhs_6x42TyRM4Wstoq8HA</td>\n",
       "      <td>The Daily Show with Trevor Noah</td>\n",
       "      <td>Sixteen-year-old climate activist Greta Thunbe...</td>\n",
       "      <td>9/14/19 13:00</td>\n",
       "      <td>https://i.ytimg.com/vi/rhQVustYV24/hqdefault.jpg</td>\n",
       "      <td>4115184.0</td>\n",
       "      <td>110654.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.020915</td>\n",
       "      <td>0.006775</td>\n",
       "      <td>0.027690</td>\n",
       "      <td>0.034465</td>\n",
       "      <td>0.001305</td>\n",
       "      <td>-0.054547</td>\n",
       "      <td>0.006637</td>\n",
       "      <td>0.061184</td>\n",
       "      <td>0.067822</td>\n",
       "      <td>0.002969</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>id:TMrtLsQbaok</td>\n",
       "      <td>UCIRYBXDze5krPDzAEOxFGVA</td>\n",
       "      <td>Guardian News</td>\n",
       "      <td>'You have stolen my dreams and my childhood wi...</td>\n",
       "      <td>9/23/19 15:22</td>\n",
       "      <td>https://i.ytimg.com/vi/TMrtLsQbaok/hqdefault.jpg</td>\n",
       "      <td>4030432.0</td>\n",
       "      <td>53115.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.017990</td>\n",
       "      <td>0.012413</td>\n",
       "      <td>0.030403</td>\n",
       "      <td>0.042816</td>\n",
       "      <td>0.002876</td>\n",
       "      <td>-0.052255</td>\n",
       "      <td>0.008758</td>\n",
       "      <td>0.061012</td>\n",
       "      <td>0.069770</td>\n",
       "      <td>0.004750</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>id:rYxt0BeTrT8</td>\n",
       "      <td>UCoMdktPbSTixAyNGwb-UYkQ</td>\n",
       "      <td>Sky News</td>\n",
       "      <td>The teenager reprimanded those who she accused...</td>\n",
       "      <td>9/24/19 8:49</td>\n",
       "      <td>https://i.ytimg.com/vi/rYxt0BeTrT8/hqdefault.jpg</td>\n",
       "      <td>2923926.0</td>\n",
       "      <td>32764.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.020742</td>\n",
       "      <td>0.017541</td>\n",
       "      <td>0.038283</td>\n",
       "      <td>0.055823</td>\n",
       "      <td>0.004512</td>\n",
       "      <td>-0.032628</td>\n",
       "      <td>0.011139</td>\n",
       "      <td>0.043767</td>\n",
       "      <td>0.054906</td>\n",
       "      <td>0.003175</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>id:KAJsdgTPJpU</td>\n",
       "      <td>UC6ZFN9Tx6xh-skXCuRHCDpQ</td>\n",
       "      <td>PBS NewsHour</td>\n",
       "      <td>Swedish climate activist Greta Thunberg chasti...</td>\n",
       "      <td>9/23/19 16:44</td>\n",
       "      <td>https://i.ytimg.com/vi/KAJsdgTPJpU/hqdefault.jpg</td>\n",
       "      <td>2551300.0</td>\n",
       "      <td>44049.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.016833</td>\n",
       "      <td>0.012666</td>\n",
       "      <td>0.029498</td>\n",
       "      <td>0.042164</td>\n",
       "      <td>0.002507</td>\n",
       "      <td>-0.044747</td>\n",
       "      <td>0.010396</td>\n",
       "      <td>0.055143</td>\n",
       "      <td>0.065540</td>\n",
       "      <td>0.004008</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>id:OwqIy8Ikv-c</td>\n",
       "      <td>UCZWlSUNDvCCS1hBiXV0zKcA</td>\n",
       "      <td>PragerU</td>\n",
       "      <td>Climate change is an urgent topic of discussio...</td>\n",
       "      <td>4/18/16 10:45</td>\n",
       "      <td>https://i.ytimg.com/vi/OwqIy8Ikv-c/hqdefault.jpg</td>\n",
       "      <td>2257695.0</td>\n",
       "      <td>47235.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.015088</td>\n",
       "      <td>0.009586</td>\n",
       "      <td>0.024673</td>\n",
       "      <td>0.034259</td>\n",
       "      <td>0.001745</td>\n",
       "      <td>-0.034312</td>\n",
       "      <td>0.010028</td>\n",
       "      <td>0.044341</td>\n",
       "      <td>0.054369</td>\n",
       "      <td>0.003317</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13662</th>\n",
       "      <td>13662</td>\n",
       "      <td>13662</td>\n",
       "      <td>74643912</td>\n",
       "      <td>10284510</td>\n",
       "      <td>The Holistic Hipppie</td>\n",
       "      <td>Replying to @balerionb #greenscreen According ...</td>\n",
       "      <td>2022-11-01T20:03:51.000Z</td>\n",
       "      <td>https://www.junkipedia.org/rails/active_storag...</td>\n",
       "      <td>35260.0</td>\n",
       "      <td>4279.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.029615</td>\n",
       "      <td>0.005962</td>\n",
       "      <td>0.035577</td>\n",
       "      <td>0.041539</td>\n",
       "      <td>0.002013</td>\n",
       "      <td>-0.045594</td>\n",
       "      <td>0.008934</td>\n",
       "      <td>0.054527</td>\n",
       "      <td>0.063461</td>\n",
       "      <td>0.004378</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13684</th>\n",
       "      <td>13684</td>\n",
       "      <td>13684</td>\n",
       "      <td>90070715</td>\n",
       "      <td>5850940</td>\n",
       "      <td>DR_ROSSOME</td>\n",
       "      <td>Let’s just hope people don’t politicize RSV th...</td>\n",
       "      <td>2022-11-23T21:12:43.000Z</td>\n",
       "      <td>https://www.junkipedia.org/rails/active_storag...</td>\n",
       "      <td>765986.0</td>\n",
       "      <td>23340.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.024770</td>\n",
       "      <td>0.012809</td>\n",
       "      <td>0.037578</td>\n",
       "      <td>0.050387</td>\n",
       "      <td>0.002950</td>\n",
       "      <td>-0.053087</td>\n",
       "      <td>0.001047</td>\n",
       "      <td>0.054134</td>\n",
       "      <td>0.055182</td>\n",
       "      <td>0.001110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13690</th>\n",
       "      <td>13690</td>\n",
       "      <td>13690</td>\n",
       "      <td>83877405</td>\n",
       "      <td>11659954</td>\n",
       "      <td>MyThoughts</td>\n",
       "      <td>Knowing what we know now, do you think this wo...</td>\n",
       "      <td>2022-12-02T00:43:08.000Z</td>\n",
       "      <td>https://www.junkipedia.org/rails/active_storag...</td>\n",
       "      <td>12790.0</td>\n",
       "      <td>470.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.021095</td>\n",
       "      <td>0.005062</td>\n",
       "      <td>0.026157</td>\n",
       "      <td>0.031219</td>\n",
       "      <td>0.001427</td>\n",
       "      <td>-0.035886</td>\n",
       "      <td>0.003077</td>\n",
       "      <td>0.038963</td>\n",
       "      <td>0.042040</td>\n",
       "      <td>0.002253</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13707</th>\n",
       "      <td>13707</td>\n",
       "      <td>13707</td>\n",
       "      <td>83103864</td>\n",
       "      <td>14409463</td>\n",
       "      <td>ellen</td>\n",
       "      <td>#stitch with @bmcpher it is my business when y...</td>\n",
       "      <td>2022-12-09T15:29:24.000Z</td>\n",
       "      <td>https://www.junkipedia.org/rails/active_storag...</td>\n",
       "      <td>24283.0</td>\n",
       "      <td>1818.0</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.013459</td>\n",
       "      <td>0.006106</td>\n",
       "      <td>0.019566</td>\n",
       "      <td>0.025672</td>\n",
       "      <td>0.001064</td>\n",
       "      <td>-0.038219</td>\n",
       "      <td>0.013194</td>\n",
       "      <td>0.051413</td>\n",
       "      <td>0.064608</td>\n",
       "      <td>0.008107</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13730</th>\n",
       "      <td>13730</td>\n",
       "      <td>13730</td>\n",
       "      <td>85400395</td>\n",
       "      <td>14553227</td>\n",
       "      <td>Claudia Pizzimenti</td>\n",
       "      <td>My sweet baby 💙 #vaccine #iloveyou #newborn #m...</td>\n",
       "      <td>2022-12-16T16:19:48.000Z</td>\n",
       "      <td>https://www.junkipedia.org/rails/active_storag...</td>\n",
       "      <td>80935.0</td>\n",
       "      <td>2107.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.009761</td>\n",
       "      <td>0.025498</td>\n",
       "      <td>0.015737</td>\n",
       "      <td>0.041236</td>\n",
       "      <td>0.002292</td>\n",
       "      <td>-0.015300</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.015300</td>\n",
       "      <td>0.015300</td>\n",
       "      <td>0.000239</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1756 rows × 51 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       Unnamed: 0  Unnamed: 0.1        video_id                channel_id  \\\n",
       "2               2             2  id:rhQVustYV24  UCwWhs_6x42TyRM4Wstoq8HA   \n",
       "3               3             3  id:TMrtLsQbaok  UCIRYBXDze5krPDzAEOxFGVA   \n",
       "5               5             5  id:rYxt0BeTrT8  UCoMdktPbSTixAyNGwb-UYkQ   \n",
       "6               6             6  id:KAJsdgTPJpU  UC6ZFN9Tx6xh-skXCuRHCDpQ   \n",
       "8               8             8  id:OwqIy8Ikv-c  UCZWlSUNDvCCS1hBiXV0zKcA   \n",
       "...           ...           ...             ...                       ...   \n",
       "13662       13662         13662        74643912                  10284510   \n",
       "13684       13684         13684        90070715                   5850940   \n",
       "13690       13690         13690        83877405                  11659954   \n",
       "13707       13707         13707        83103864                  14409463   \n",
       "13730       13730         13730        85400395                  14553227   \n",
       "\n",
       "                         channel_title  \\\n",
       "2      The Daily Show with Trevor Noah   \n",
       "3                        Guardian News   \n",
       "5                             Sky News   \n",
       "6                         PBS NewsHour   \n",
       "8                              PragerU   \n",
       "...                                ...   \n",
       "13662             The Holistic Hipppie   \n",
       "13684                       DR_ROSSOME   \n",
       "13690                       MyThoughts   \n",
       "13707                            ellen   \n",
       "13730               Claudia Pizzimenti   \n",
       "\n",
       "                                       video_description  \\\n",
       "2      Sixteen-year-old climate activist Greta Thunbe...   \n",
       "3      'You have stolen my dreams and my childhood wi...   \n",
       "5      The teenager reprimanded those who she accused...   \n",
       "6      Swedish climate activist Greta Thunberg chasti...   \n",
       "8      Climate change is an urgent topic of discussio...   \n",
       "...                                                  ...   \n",
       "13662  Replying to @balerionb #greenscreen According ...   \n",
       "13684  Let’s just hope people don’t politicize RSV th...   \n",
       "13690  Knowing what we know now, do you think this wo...   \n",
       "13707  #stitch with @bmcpher it is my business when y...   \n",
       "13730  My sweet baby 💙 #vaccine #iloveyou #newborn #m...   \n",
       "\n",
       "             video_publish_date  \\\n",
       "2                 9/14/19 13:00   \n",
       "3                 9/23/19 15:22   \n",
       "5                  9/24/19 8:49   \n",
       "6                 9/23/19 16:44   \n",
       "8                 4/18/16 10:45   \n",
       "...                         ...   \n",
       "13662  2022-11-01T20:03:51.000Z   \n",
       "13684  2022-11-23T21:12:43.000Z   \n",
       "13690  2022-12-02T00:43:08.000Z   \n",
       "13707  2022-12-09T15:29:24.000Z   \n",
       "13730  2022-12-16T16:19:48.000Z   \n",
       "\n",
       "                                         video_thumbnail  video_view_count  \\\n",
       "2       https://i.ytimg.com/vi/rhQVustYV24/hqdefault.jpg         4115184.0   \n",
       "3       https://i.ytimg.com/vi/TMrtLsQbaok/hqdefault.jpg         4030432.0   \n",
       "5       https://i.ytimg.com/vi/rYxt0BeTrT8/hqdefault.jpg         2923926.0   \n",
       "6       https://i.ytimg.com/vi/KAJsdgTPJpU/hqdefault.jpg         2551300.0   \n",
       "8       https://i.ytimg.com/vi/OwqIy8Ikv-c/hqdefault.jpg         2257695.0   \n",
       "...                                                  ...               ...   \n",
       "13662  https://www.junkipedia.org/rails/active_storag...           35260.0   \n",
       "13684  https://www.junkipedia.org/rails/active_storag...          765986.0   \n",
       "13690  https://www.junkipedia.org/rails/active_storag...           12790.0   \n",
       "13707  https://www.junkipedia.org/rails/active_storag...           24283.0   \n",
       "13730  https://www.junkipedia.org/rails/active_storag...           80935.0   \n",
       "\n",
       "       video_like_count  ... sanctity_valence sanctity_positive  \\\n",
       "2              110654.0  ...        -0.020915          0.006775   \n",
       "3               53115.0  ...        -0.017990          0.012413   \n",
       "5               32764.0  ...        -0.020742          0.017541   \n",
       "6               44049.0  ...        -0.016833          0.012666   \n",
       "8               47235.0  ...        -0.015088          0.009586   \n",
       "...                 ...  ...              ...               ...   \n",
       "13662            4279.0  ...        -0.029615          0.005962   \n",
       "13684           23340.0  ...        -0.024770          0.012809   \n",
       "13690             470.0  ...        -0.021095          0.005062   \n",
       "13707            1818.0  ...        -0.013459          0.006106   \n",
       "13730            2107.0  ...         0.009761          0.025498   \n",
       "\n",
       "      sanctity_negative  sanctity_strength sanctity_ambivalence  \\\n",
       "2              0.027690           0.034465             0.001305   \n",
       "3              0.030403           0.042816             0.002876   \n",
       "5              0.038283           0.055823             0.004512   \n",
       "6              0.029498           0.042164             0.002507   \n",
       "8              0.024673           0.034259             0.001745   \n",
       "...                 ...                ...                  ...   \n",
       "13662          0.035577           0.041539             0.002013   \n",
       "13684          0.037578           0.050387             0.002950   \n",
       "13690          0.026157           0.031219             0.001427   \n",
       "13707          0.019566           0.025672             0.001064   \n",
       "13730          0.015737           0.041236             0.002292   \n",
       "\n",
       "      liberty_valence  liberty_positive  liberty_negative  liberty_strength  \\\n",
       "2           -0.054547          0.006637          0.061184          0.067822   \n",
       "3           -0.052255          0.008758          0.061012          0.069770   \n",
       "5           -0.032628          0.011139          0.043767          0.054906   \n",
       "6           -0.044747          0.010396          0.055143          0.065540   \n",
       "8           -0.034312          0.010028          0.044341          0.054369   \n",
       "...               ...               ...               ...               ...   \n",
       "13662       -0.045594          0.008934          0.054527          0.063461   \n",
       "13684       -0.053087          0.001047          0.054134          0.055182   \n",
       "13690       -0.035886          0.003077          0.038963          0.042040   \n",
       "13707       -0.038219          0.013194          0.051413          0.064608   \n",
       "13730       -0.015300          0.000000          0.015300          0.015300   \n",
       "\n",
       "      liberty_ambivalence  \n",
       "2                0.002969  \n",
       "3                0.004750  \n",
       "5                0.003175  \n",
       "6                0.004008  \n",
       "8                0.003317  \n",
       "...                   ...  \n",
       "13662            0.004378  \n",
       "13684            0.001110  \n",
       "13690            0.002253  \n",
       "13707            0.008107  \n",
       "13730            0.000239  \n",
       "\n",
       "[1756 rows x 51 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# create a list of gender values to filter by\n",
    "genders = ['female', 'male']\n",
    "\n",
    "# filter the dataframe by cities\n",
    "filtered_df = df[df['gender'].isin(genders)]\n",
    "filtered_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "6f7060b8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "YouTube    1436\n",
       "TikTok      320\n",
       "Name: platform, dtype: int64"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "name_freq = filtered_df['platform'].value_counts()\n",
    "name_freq"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "f2574433",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Write data\n",
    "#filtered_df.to_csv(path + 'moral scored_final_dataset_march_10_2023_FemaleMaleOnly.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e8e49c1c",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
